/**
 * This software is copyrighted by Bosch Connected Devices and Solutions GmbH, 2016.
 * The use of this software is subject to the XDK SDK EULA
 */

#ifndef ACCELEROMETER_H_
#define ACCELEROMETER_H_

/* private type and macro definitions */

/* constant definitions ***************************************************** */
#define ENABLE_UNDERSAMPLING              UINT8_C(1)
#define BMA2X2_FILTERED_LOW_BANDWIDTH     UINT8_C(0) /*< used to set low bandwidth*/
#define INIT_DONE                         UINT8_C(1)
#define INIT_NOT_DONE                     UINT8_C(0)
#define GET_MAPPING_ERROR                 INT8_C(-2)
#define PACKAGE_ID_DEFAULT                UINT32_C(0) /**< default package ID*/

/** macro used to for converting LSB to mg */
#define BMA2X2_SUPPORT_2G_RANGE           UINT8_C(2)
#define BMA2X2_SUPPORT_4G_RANGE           UINT8_C(4)
#define BMA2X2_SUPPORT_8G_RANGE           UINT8_C(8)
#define BMA2X2_SUPPORT_16G_RANGE          UINT8_C(16)
#define BMI160_SUPPORT_2G_RANGE           UINT8_C(2)
#define BMI160_SUPPORT_4G_RANGE           UINT8_C(4)
#define BMI160_SUPPORT_8G_RANGE           UINT8_C(8)
#define BMI160_SUPPORT_16G_RANGE          UINT8_C(16)

/** macro used for getting one bit resolution on a 11 bit data */
#define BMA2X2_ONEBITRESOLUTION                  INT32_C(8192)
/** macro used for converting g to mg */
#define ACCEL_CONV_G_MG                         INT32_C(1000)
/** macro used for getting one bit resolution on a 16 bit accel data */
#define BMI160_ONEBITRESOLUTION                 UINT32_C(32768)

#endif /* ACCELEROMETER_H_*/

